/**
* Copyright (c) 2022 - present TinyVue Authors.
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

@import '../custom.less';
@import './vars.less';

@option-group-prefix-cls: ~'@{css-prefix}option-group';

.@{option-group-prefix-cls} {
  .component-css-vars-option-group();

  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;

  &:not(:last-of-type) {
    padding-bottom: var(--ti-option-group-padding-bottom);
  }

  &:not(:last-of-type)::after {
    content: '';
    position: absolute;
    display: block;
    left: 8px;
    right: 8px;
    bottom: 12px;
    height: var(--ti-option-group-line-dividing-height);
    background: var(--ti-option-group-line-dividing-bg-color);
  }

  .@{option-group-prefix-cls}__title {
    padding: 0 var(--ti-option-group-title-padding-horizontal);
    font-size: var(--ti-option-group-title-font-size);
    font-weight: var(--ti-option-group-title-font-weight);
    color: var(--ti-option-group-title-text-color);
    line-height: var(--ti-option-group-title-line-height);
    height: var(--ti-option-group-title-height);
    margin-top: var(--ti-option-group-title-margin-top);
  }

  &:first-child .@{option-group-prefix-cls}__title {
    margin-top: var(--ti-option-group-title-margin-top-first);
  }

  .@{option-group-prefix-cls}__list {
    .tiny-option {
      padding: var(--ti-option-padding-vertical) var(--ti-option-padding-horizontal-group);
    }
  }
}
